package com.imau.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_user")
public class User implements Serializable {


    @TableId(type= IdType.ASSIGN_ID)
    private String id;

    /**用户名*/
    private String username; //2020142222.....

    /**用户密码*/
    private String password;

    /**启用状态 0是禁用，1是启用*/
    private Integer enableState;

    /**创建时间*/
    private Date createTime;

    /**修改时间*/
    private Date updateTime;

    /**部门ID*/
    @TableField(exist = false)
    private  Department dept;

    /**手机号*/
    private String  mobile;

    /**角色*/
    @TableField(exist=false)
    private Set<Role> roles = new HashSet<>();//用户与角色多对多


}
